import axios from '@/libs/api.request'

/**
 * 获取表格数据
 * @return {[type]}        [description]
 */
export const fetchTableData = params => {
  return axios.request({
    url: '/api/forecast/getMeterListPaged',
    method: 'get',
    params
  })
}
/**
 * 获取矩形方图数据
 * @return {[type]}        [description]
 */
export const fetchTreeMap = params => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterGasCalssCountByYear',
    method: 'get',
    params
  })
}

/**
 * 表具详情
 * @return {[type]}        [description]
 */
export const fetchMeterDetail = id => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterBeanByMeterId/' + id,
    method: 'get'
  })
}

/**
 * 中间地图数据
 * @return {[type]}        [description]
 */
export const fetchEHeatmapData = (params) => {
  return axios.request({
    url: '/api/gasLaw/getMeterGasByDefinitelyGas',
    method: 'get',
    params
  })
}

/**
 * 用气时段
 * @return {[type]}        [description]
 */
export const fetchDayDetail = (params) => {
  return axios.request({
    url: '/api/gasLaw/getMeterGasByHours',
    method: 'get',
    params
  })
}

/**
 * desc: 饼图数据
 * param {*} params
 * return {*}
 */
export const fetchYqglPieData = (params) => {
  return axios.request({
    url: '/api/gasLaw/getCollectBastTime',
    method: 'get',
    params
  })
}

export const fetchUseGasTableData = (data) => {
  return axios.request({
    url: '/api/gasLaw/gerMeterPaged',
    method: 'post',
    data
  })
}
